<template>
  <view :style="themeColor">
    <view class="page">
      <fu-custom :isBack="true" bgColor="bg-white" class="header" :isBottom="true">
        <block slot="content">余额明细</block>
        <block slot="right">
          <image @tap.stop="popupShow1691659161301=true" class='balanceDetail_fd0_0_c2_c0' mode="aspectFit"
            :src='STATIC_URL+"576.png"'></image>
        </block>
      </fu-custom>
      <!---flex布局flex布局开始-->
      <view class="flex flex-direction align-stretch benben-flex-layout">
        <view>
          <benben-flex-tabs class-name='balanceDetail_benbenTabsfd1_0' v-model="tabs" ref="benben_tabsfd1_0"
            select-mark="benben_tabsfd1_0" key="benben_tabsfd1_0" :open-title-type='false' :open-sticky='true' :top='88'
            :is-show-content='false' :scrollspy='false' :tabs-info.sync="tabsInfofd1_0" @change="getListFunc()">

            <scroll-view @scroll="tabsInfofd1_0.scrollX = $event.detail.scrollLeft" id="benben_tabsfd1_0"
              class="benben-tabs" style="width:750rpx" :scroll-x="true" :scroll-left.sync="tabsInfofd1_0.moveX"
              scroll-with-animation="all .3s ease">
              <view class="benben-tabs-content" id="benben_tabsfd1_0-content">
                <view id="benben_tabsfd1_0-title" class="benben-tabs-title flex align-center flex ">
                  <view
                    :class="{ 'checkTitlefd1_0': tabs == '0', 'flex flex-wrap align-center balanceDetail_titlefd1_0_c3': true }"
                    @tap="tabs = '0'" :id="`benben_tabsfd1_0-title-item-${'0'}`">

                    <text>全部</text>

                  </view>
                  <view
                    :class="{ 'checkTitlefd1_0': tabs == '1', 'flex flex-wrap align-center balanceDetail_titlefd1_0_c4': true }"
                    @tap="tabs = '1'" :id="`benben_tabsfd1_0-title-item-${'1'}`">

                    <text>收入记录</text>

                  </view>
                  <view :class="{ 'checkTitlefd1_0': tabs == '2', 'flex flex-wrap align-center': true }"
                    @tap="tabs = '2'" :id="`benben_tabsfd1_0-title-item-${'2'}`">

                    <text>支出记录</text>

                  </view>
                </view>
                <view :style="{ left: tabsInfofd1_0.lineleft, maxWidth: tabsInfofd1_0.lineWidth ,}"
                  id="benben_tabsfd1_0-line"
                  class="benben-tabs-line flex benben-flex-tabs-line balanceDetail_linefd1_0"></view>
              </view>
            </scroll-view>

          </benben-flex-tabs>

        </view>
        <view class='flex flex-direction align-stretch balanceDetail_fd1_1'>
          <template v-for='(item,key0) in dataMessage'>
            <view class='flex flex-wrap align-center justify-between balanceDetail_fd1_1_c0' :key='key0'>
              <view class='flex flex-direction flex-wrap align-stretch flex-sub'>
                <text class='balanceDetail_fd1_1_c0_c0_c0'>{{item.remark}}</text>
                <text class='balanceDetail_fd1_1_c0_c0_c1'>{{item.create_time}}</text>
              </view>
              <view class='flex flex-wrap align-center balanceDetail_fd1_1_c0_c1'>
                <text class='balanceDetail_fd1_1_c0_c1_c0' v-if="item.money_type=='1'">+</text>
                <text class='balanceDetail_fd1_1_c0_c1_c1' v-if="item.money_type=='1'">{{item.change_money}}</text><text
                  class='balanceDetail_fd1_1_c0_c1_c1_1' v-if="item.money_type=='2'">{{item.change_money}}</text>
              </view>
            </view>
          </template>
          <fu-empty :pagingListLoadedAll="pagingListLoadedAll" :pagingListNoListData="pagingListNoListData"
            :listDataLength="listDataLength" :isLoadInit="isLoadInit"></fu-empty>
        </view>
      </view>

      <!---flex布局flex布局结束-->
      <benben-popup v-model="popupShow1691659161301" :mask="true" :mask-close-able="true" mode='center'>
        <!---flex布局flex布局开始-->
        <view class="flex benben-flex-layout flex-wrap align-center">
          <benben-calendar-diy mode='range' year-arrow-color='#666666' month-arrow-color='#666666' start-text=' '
            end-text=' ' active-bg-color='rgba(41,121,255,1)' range-bg-color='rgba(41,121,255,0.13)'
            :change-title='true' :change-year='true' :change-month='true' class='balanceDetail_fd2_0'
            @change="getListFunc()" :start-time.sync="time_start" :end-time.sync="time_end"></benben-calendar-diy>
        </view>

        <!---flex布局flex布局结束-->

      </benben-popup>


    </view>
  </view>
</template>
<script>
  import pagingList from '@/common/mixin/paging_list.js';
  import {
    validate
  } from '@/common/utils/validate.js'
  export default {
    components: {},
    mixins: [pagingList],

    data() {
      return {
        "popupShow1691659161301": false,
        "tabsInfofd1_0": {
          lineleft: '',
          lineWidth: '',
          moveX: 0,
          scrollX: 0,
          PageScrollX: 0
        },
        "minixPagingListsApi": "",
        "pageingListApiMethod": "",
        "allowOnloadGetList": false,
        "tabs": "0",
        "dataMessage": [],
        "time_start": "",
        "time_end": ""
      };
    },
    computed: {
      themeColor() {
        return this.$store.getters.themeColor
      },

    },
    watch: {},
    onLoad(options) {
      this.getListFunc()
    },
    onUnload() {

    },
    onReady() {

    },
    onShow() {

    },
    onHide() {

    },
    onResize() {

    },
    onPullDownRefresh() {
      this.getListFunc()
    },
    onReachBottom(e) {

    },
    onPageScroll(e) {

    },
    methods: {
      //钱包-余额明细
      getListFunc() {
        this.minixPagingListsApi = global.apiUrls.post636dfee37deef;
        this.pageingListApiMethod = 'get';
        this.allowOnloadGetList = false;
        this.pagingListPostDataContent = {
          create_time: this.time_start,
          money_type: this.tabs,
          end_time: this.time_end
        }
        this.listData = [];
        this.dataMessage = this.listData;
        this.pagingListToggle();

        this.popupShow1691659161301 = false;
      },
      pagingListPostData() {
        return this.pagingListPostDataContent
      }
    }
  };
</script>
<style lang="scss" scoped>
  .page {
    width: 100vw;
    overflow-x: hidden;
    min-height: calc(100vh - var(--window-bottom));
    background: #F8F8F8;
    background-size: 100% auto;
  }

  .balanceDetail_flex_0 {
    background: #fff;
    width: 750rpx;
    height: 88rpx;
    overflow: hidden;
    z-index: 10;
    top: 0rpx;
    background-size: 100% auto !important;
  }

  .balanceDetail_fd0_0_c2_c0 {
    width: 36rpx;
    height: 36rpx;
    border-radius: 0rpx 0rpx 0rpx 0rpx;
  }

  .balanceDetail_fd0_0_c1_c0 {
    font-size: 36rpx;
    font-weight: 500;
    color: #333;
  }

  .balanceDetail_fd0_0_c0_c0 {
    font-size: 32rpx;
    font-weight: 500;
    color: #333;
  }

  .balanceDetail_fd0_0_c0 {
    width: 180rpx;
  }

  .balanceDetail_fd0_0 {
    padding: 0rpx 32rpx 0rpx 32rpx;
    line-height: 88rpx;
  }

  .balanceDetail_fd1_1_c0_c1_c1_1 {
    padding: 0rpx 5rpx 0rpx 0rpx;
    font-size: 32rpx;
    font-weight: 700;
    color: var(--benbenFontColor0);
  }

  .balanceDetail_fd1_1_c0_c1_c1 {
    padding: 0rpx 5rpx 0rpx 0rpx;
    font-size: 32rpx;
    font-weight: 700;
    color: rgba(204, 0, 0, 1);
  }

  .balanceDetail_fd1_1_c0_c1_c0 {
    font-size: 32rpx;
    font-weight: 700;
    color: rgba(204, 0, 0, 1);
    margin: 0rpx 5rpx 0rpx 0rpx;
  }

  .balanceDetail_fd1_1_c0_c1 {
    color: rgba(250, 32, 51, 1);
    font-weight: 500;
    font-size: 32rpx;
  }

  .balanceDetail_fd1_1_c0_c0_c1 {
    font-size: 24rpx;
    font-weight: 400;
    color: rgba(191, 191, 191, 1);
    margin: 16rpx 0rpx 0rpx 0rpx;
  }

  .balanceDetail_fd1_1_c0_c0_c0 {
    font-size: 32rpx;
    font-weight: 400;
    color: #333333;
    padding: 0rpx 24rpx 0rpx 0rpx;
    -webkit-line-clamp: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
  }

  .balanceDetail_fd1_1_c0 {
    border-bottom: 1px solid #eee;
    padding: 32rpx 0rpx 32rpx 0rpx;
  }

  .balanceDetail_fd1_1 {
    background: var(--benbenbgColor1);
    padding: 0rpx 32rpx 0rpx 32rpx;
    background-size: 100% auto;
    margin: 20rpx 0rpx 0rpx 0rpx;
  }

  .balanceDetail_titlefd1_0_c4 {
    margin: 0rpx 120rpx 0rpx 0rpx;
  }

  .balanceDetail_titlefd1_0_c3 {
    margin: 0rpx 140rpx 0rpx 107rpx;
  }

  .balanceDetail_linefd1_0 {
    background: url(image-path('502.png')) no-repeat;
    width: 64rpx;
    height: 10rpx;
    top: 60rpx;
    background-size: 100% auto !important;
    border-radius: 10rpx 10rpx 10rpx 10rpx;
  }

  .checkTitlefd1_0 {
    font-weight: 700 !important;
    font-size: 32rpx !important;
    color: rgba(51, 51, 51, 1) !important;
    background-color: rgba(255, 255, 255, 1) !important;
  }

  ::v-deep .balanceDetail_benbenTabsfd1_0 {
    background: #fff;
    width: 750rpx;
    height: 94rpx;
    white-space: nowrap;
    text-align: center;
    font-size: 32rpx;
    font-weight: 400;
    color: rgba(102, 102, 102, 1);
  }

  .balanceDetail_fd2_0 {
    background: #ffffff;
    width: 622rpx;
    border-radius: 24rpx;
    padding: 12rpx 012rpx 012rpx 012rpx;
  }
</style>